home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_qt.idb / usr / freeware / include / Qt / qtoolbar.h.z / qtoolbar.h
Encoding:
C/C++ Source or Header  |  1998-10-28  |  1.9 KB  |  76 lines

  1. /****************************************************************************
  2. ** $Id: qtoolbar.h,v 2.10 1998/07/03 00:09:54 hanord Exp $
  3. **
  4. ** Definition of QToolBar class
  5. **
  6. ** Created : 980306
  7. **
  8. ** Copyright (C) 1992-1998 Troll Tech AS.  All rights reserved.
  9. **
  10. ** This file is part of Qt Free Edition, version 1.40.
  11. **
  12. ** See the file LICENSE included in the distribution for the usage
  13. ** and distribution terms, or http://www.troll.no/free-license.html.
  14. **
  15. ** IMPORTANT NOTE: You may NOT copy this file or any part of it into
  16. ** your own programs or libraries.
  17. **
  18. ** Please see http://www.troll.no/pricing.html for information about 
  19. ** Qt Professional Edition, which is this same library but with a
  20. ** license which allows creation of commercial/proprietary software.
  21. **
  22. *****************************************************************************/
  23.  
  24. #ifndef QTOOLBAR_H
  25. #define QTOOLBAR_H
  26.  
  27. #ifndef QT_H
  28. #include "qwidget.h"
  29. #include "qmainwindow.h"
  30. #endif // QT_H
  31.  
  32. class QButton;
  33. class QBoxLayout;
  34. class QToolBarPrivate;
  35.  
  36.  
  37. class QToolBar: public QWidget
  38. {
  39.     Q_OBJECT
  40. public:
  41.     QToolBar( const char * label,
  42.           QMainWindow *, QMainWindow::ToolBarDock = QMainWindow::Top,
  43.           bool newLine = FALSE, const char * name = 0 );
  44.     QToolBar( const char * label, QMainWindow *, QWidget *,
  45.           bool newLine = FALSE, const char * name = 0, WFlags f = 0 );
  46.     QToolBar( QMainWindow * parent = 0, const char * name = 0 );
  47.     ~QToolBar();
  48.  
  49.     void addSeparator();
  50.  
  51.     enum Orientation { Horizontal, Vertical };
  52.     virtual void setOrientation( Orientation );
  53.     Orientation orientation() const { return o; }
  54.  
  55.     void show();
  56.  
  57.     QMainWindow * mainWindow();
  58.  
  59.     void setStretchableWidget( QWidget * );
  60.  
  61. protected:
  62.     void paintEvent( QPaintEvent * );
  63.  
  64. private:
  65.     void setUpGM();
  66.  
  67.     QBoxLayout * b;
  68.     QToolBarPrivate * d;
  69.     Orientation o;
  70.     QMainWindow * mw;
  71.     QWidget * sw;
  72. };
  73.  
  74.  
  75. #endif
  76.